package com.sllp.C71S3TsllpShop.web;

import java.io.File;
import java.io.IOException;
import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

@Controller
public class TestAction {

	@PostMapping("submit.do")
	public void submit(@RequestParam List<String> a,MultipartFile file) throws IllegalStateException, IOException {
		System.out.println(a);
		File diskfile= new File("d:/"+file.getOriginalFilename());
		file.transferTo(diskfile);
	}
	
	
	//文件上传

}
